package com.itheima.search.controller;

import org.elasticsearch.search.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/search")
@CrossOrigin("*") // 处理跨域问题
public class SearchController {
    @Autowired
    private SearchService searchService;
    @PostMapping
    public Map search(@RequestBody Map searchMap) throws Exception {
//        Map resultMap = searchService.search(searchMap);
        return null;
    }
}